package cloud.tianai.mate.captcha.generator.common.model.dto;

import cloud.tianai.captcha.generator.common.model.dto.ImageCaptchaInfo;
import cloud.tianai.mate.captcha.common.constant.MateCaptchaTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @Author: 天爱有情
 * @date 2024/3/16 12:02
 * @Description 曲线
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CurveImageCaptchaInfo extends ImageCaptchaInfo {

    private Integer startX;
    private Integer startY;
    private Integer endX;
    private Integer endY;
    private Integer ctrlX;
    private Integer ctrlY;

//    public static final Float DEFAULT_TOLERANT = 0.03F;

//    public static CurveImageCaptchaInfo of(Integer startX,
//                                           Integer startY,
//                                           Integer endX,
//                                           Integer endY,
//                                           Integer ctrlX,
//                                           Integer ctrlY,
//                                           String backgroundImage,
//                                           String backgroundImageTag,
//                                           Integer bgImageWidth,
//                                           Integer bgImageHeight) {
//        CurveImageCaptchaInfo rotateImageCaptchaInfo = new CurveImageCaptchaInfo();
//        rotateImageCaptchaInfo.setStartX(startX);
//        rotateImageCaptchaInfo.setStartY(startY);
//        rotateImageCaptchaInfo.setEndX(endX);
//        rotateImageCaptchaInfo.setEndY(endY);
//        rotateImageCaptchaInfo.setCtrlX(ctrlX);
//        rotateImageCaptchaInfo.setCtrlY(ctrlY);
//        rotateImageCaptchaInfo.setRandomX(ctrlX);
//        rotateImageCaptchaInfo.setBackgroundImage(backgroundImage);
//        rotateImageCaptchaInfo.setBackgroundImageTag(backgroundImageTag);
////        rotateImageCaptchaInfo.setTolerant(DEFAULT_TOLERANT);
//        rotateImageCaptchaInfo.setBackgroundImageWidth(bgImageWidth);
//        rotateImageCaptchaInfo.setBackgroundImageHeight(bgImageHeight);
//        rotateImageCaptchaInfo.setType(MateCaptchaTypeConstant.CURVE);
//        return rotateImageCaptchaInfo;
//    }

}
